<?php
require_once('configure.php');
$data_id = isset($_GET['_value']) ? (int) $_GET['_value'] : 0 ;
$query = "SELECT a.golongan_jabatan_id, b.kode_golongan_jabatan FROM spd_non_karyawan_gol a
	INNER JOIN golongan_jabatan b ON b.golongan_jabatan_id=a.golongan_jabatan_id 
	WHERE jenis_non_karyawan_id={$data_id} 
	ORDER BY kode_golongan_jabatan";	
$datas = array();
$res = my_query($query);
$datas[] = array(0 =>'');
while( $re =my_fetch_array($res )){
	$datas[] = array($re['golongan_jabatan_id'] => $re['kode_golongan_jabatan']);
}
if($data_id  == 0) 
	$datas[] = array( 0 => 'Silahkan pilih Jenis Non Karyawan');
	echo json_encode( $datas );
?>